package com.tony.pmp.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tony.pmp.model.entity.SysUserPostEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * @Title: SysUserPostMapper
 * @Auther: 皮蛋布丁
 * @Date: 2021/07/09/10:05
 * @Description: 用户与岗位关联表
 */
@Mapper
public interface SysUserPostMapper extends BaseMapper<SysUserPostEntity> {

    /**
    * @Description: getPostNameByUserId 根据userId获取用户岗位信息
    * @Param: [userId]
    * @return: java.util.Set<java.lang.String>
    * @Author: 皮蛋布丁
    * @Date: 2021/7/26 11:49
    */
    Set<String> getPostNameByUserId(@Param("userId") Long userId);

    /**
    * @Description: getByUserId 根据useId获取用户岗位信息
    * @Param: [userId]
    * @return: java.util.List<com.tony.pmp.model.entity.SysUserPostEntity>
    * @Author: 皮蛋布丁
    * @Date: 2021/7/26 14:07
    */
    List<SysUserPostEntity> getByUserId(@Param("userId") Long userId);

    /**
    * @Description: queryPostIdList 根据userId获取用户岗位id信息
    * @Param: [userId]
    * @return: java.util.List<java.lang.Long>
    * @Author: 皮蛋布丁
    * @Date: 2021/7/26 21:31
    */
    List<Long> queryPostIdList(Long userId);

    int deleteByPrimaryKey(Integer id);

    int insert(SysUserPostEntity record);

    int insertSelective(SysUserPostEntity record);

    SysUserPostEntity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUserPostEntity record);

    int updateByPrimaryKey(SysUserPostEntity record);
}